using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VGLJOUR
    {
        public DataRow Convert2GLJOUR(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryGLJOUR(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["GLJVOUCHER"] = " ".PadRight(8 ); 
         dwReturn["GLJLINE"] = " ".PadRight(4 ); 
         dwReturn["GLJMANDANT"] = " ".PadRight(2 ); 
         dwReturn["GLJFIMANDANT"] = " ".PadRight(3 ); 
         dwReturn["GLJCONAREA"] = " ".PadRight(4 ); 
         dwReturn["GLJYEAR"] = " ".PadRight(4 ); 
         dwReturn["GLJPERIOD"] = " ".PadRight(2 ); 
         dwReturn["GLJBOOKCODE"] = " ".PadRight(3 ); 
         dwReturn["GLJACCKIND"] = " ".PadRight(1 ); 
         dwReturn["GLJACCOUNT"] = " ".PadRight(15 ); 
         dwReturn["GLJDEBCRED"] = " ".PadRight(1 ); 
         dwReturn["GLJAMICU"] = " ".PadRight(0 ); 
         dwReturn["GLJAMFCU"] = " ".PadRight(0 ); 
         dwReturn["GLJWEXRATE"] = " ".PadRight(0 ); 
         dwReturn["GLJBOOKDAT"] = " ".PadRight(0 ); 
         dwReturn["GLJINVDAT"] = " ".PadRight(0 ); 
         dwReturn["GLJVALUEDAT"] = " ".PadRight(0 ); 
         dwReturn["GLJOPITEM"] = " ".PadRight(10 ); 
         dwReturn["GLJINVNO"] = " ".PadRight(8 ); 
         dwReturn["GLJOPSUFF"] = " ".PadRight(2 ); 
         dwReturn["GLJCURRENCY"] = " ".PadRight(3 ); 
         dwReturn["GLJADINVNO"] = " ".PadRight(12 ); 
         dwReturn["GLJTAXKEY"] = " ".PadRight(3 ); 
         dwReturn["GLJTAXCLASS"] = " ".PadRight(2 ); 
         dwReturn["GLJTAXPERC"] = " ".PadRight(0 ); 
         dwReturn["GLJTAXNO"] = " ".PadRight(20 ); 
         dwReturn["GLJSERNO"] = " ".PadRight(0 ); 
         dwReturn["GLJTOP"] = " ".PadRight(4 ); 
         dwReturn["GLJCDAMICU"] = " ".PadRight(0 ); 
         dwReturn["GLJCDAMFCU"] = " ".PadRight(0 ); 
         dwReturn["GLJCDDAYS1"] = " ".PadRight(0 ); 
         dwReturn["GLJCDPERC1"] = " ".PadRight(0 ); 
         dwReturn["GLJCDDAYS2"] = " ".PadRight(0 ); 
         dwReturn["GLJCDPERC2"] = " ".PadRight(0 ); 
         dwReturn["GLJCDDAYSN"] = " ".PadRight(0 ); 
         dwReturn["GLJCCENTER"] = " ".PadRight(6 ); 
         dwReturn["GLJINVORDER"] = " ".PadRight(8 ); 
         dwReturn["GLJCGNO"] = " ".PadRight(8 ); 
         dwReturn["GLJARTCLASS"] = " ".PadRight(1 ); 
         dwReturn["GLJBARCODE"] = " ".PadRight(8 ); 
         dwReturn["GLJCOSTOBJ"] = " ".PadRight(24 ); 
         dwReturn["GLJCOSTOBJC"] = " ".PadRight(1 ); 
         dwReturn["GLJQUANTSTD"] = " ".PadRight(0 ); 
         dwReturn["GLJQUSTDUN"] = " ".PadRight(3 ); 
         dwReturn["GLJQUANTINV"] = " ".PadRight(0 ); 
         dwReturn["GLJQUINVUN"] = " ".PadRight(3 ); 
         dwReturn["GLJHRNO"] = " ".PadRight(8 ); 
         dwReturn["GLJCPD"] = " ".PadRight(1 ); 
         dwReturn["GLJLIABLE"] = " ".PadRight(1 ); 
         dwReturn["GLJINVCU"] = " ".PadRight(8 ); 
         dwReturn["GLJINVADDR"] = " ".PadRight(8 ); 
         dwReturn["GLJPROGRP"] = " ".PadRight(3 ); 
         dwReturn["GLJARTGRP"] = " ".PadRight(3 ); 
         dwReturn["GLJPLANT"] = " ".PadRight(3 ); 
         dwReturn["GLJDEPT"] = " ".PadRight(3 ); 
         dwReturn["GLJDLAND"] = " ".PadRight(3 ); 
         dwReturn["GLJCENTRE"] = " ".PadRight(8 ); 
         dwReturn["GLJASSOC"] = " ".PadRight(8 ); 
         dwReturn["GLJCREDCU"] = " ".PadRight(8 ); 
         dwReturn["GLJORDERCU"] = " ".PadRight(8 ); 
         dwReturn["GLJAGENT"] = " ".PadRight(8 ); 
         dwReturn["GLJDELNOTE"] = " ".PadRight(8 ); 
         dwReturn["GLJTRIANGLE"] = " ".PadRight(1 ); 
         dwReturn["GLJLASTPOS"] = " ".PadRight(1 ); 
         dwReturn["GLJBOOKED"] = " ".PadRight(1 ); 
         dwReturn["GLJFILLER1"] = " ".PadRight(73 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapGLJOUR(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveGLJOUR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryGLJOUR(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapGLJOUR(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertGLJOUR(dwLocal, ITXDBVERSION);
            }
            UpdateGLJOUR(dwLocal);
        }
        public void InsertGLJOUR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO GLJOUR(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryGLJOUR(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM GLJOUR WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM GLJOUR  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "GLJOUR";
            Return = Result;
            return Return;
        }
        public void DeleteGLJOUR(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM GLJOUR   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateGLJOUR(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE GLJOUR SET "
                    +"GLJVOUCHER= :GLJVOUCHER,"
                    +"GLJLINE= :GLJLINE,"
                    +"GLJMANDANT= :GLJMANDANT,"
                    +"GLJFIMANDANT= :GLJFIMANDANT,"
                    +"GLJCONAREA= :GLJCONAREA,"
                    +"GLJYEAR= :GLJYEAR,"
                    +"GLJPERIOD= :GLJPERIOD,"
                    +"GLJBOOKCODE= :GLJBOOKCODE,"
                    +"GLJACCKIND= :GLJACCKIND,"
                    +"GLJACCOUNT= :GLJACCOUNT,"
                    +"GLJDEBCRED= :GLJDEBCRED,"
                    +"GLJAMICU= :GLJAMICU,"
                    +"GLJAMFCU= :GLJAMFCU,"
                    +"GLJWEXRATE= :GLJWEXRATE,"
                    +"GLJBOOKDAT= :GLJBOOKDAT,"
                    +"GLJINVDAT= :GLJINVDAT,"
                    +"GLJVALUEDAT= :GLJVALUEDAT,"
                    +"GLJOPITEM= :GLJOPITEM,"
                    +"GLJINVNO= :GLJINVNO,"
                    +"GLJOPSUFF= :GLJOPSUFF,"
                    +"GLJCURRENCY= :GLJCURRENCY,"
                    +"GLJADINVNO= :GLJADINVNO,"
                    +"GLJTAXKEY= :GLJTAXKEY,"
                    +"GLJTAXCLASS= :GLJTAXCLASS,"
                    +"GLJTAXPERC= :GLJTAXPERC,"
                    +"GLJTAXNO= :GLJTAXNO,"
                    +"GLJSERNO= :GLJSERNO,"
                    +"GLJTOP= :GLJTOP,"
                    +"GLJCDAMICU= :GLJCDAMICU,"
                    +"GLJCDAMFCU= :GLJCDAMFCU,"
                    +"GLJCDDAYS1= :GLJCDDAYS1,"
                    +"GLJCDPERC1= :GLJCDPERC1,"
                    +"GLJCDDAYS2= :GLJCDDAYS2,"
                    +"GLJCDPERC2= :GLJCDPERC2,"
                    +"GLJCDDAYSN= :GLJCDDAYSN,"
                    +"GLJCCENTER= :GLJCCENTER,"
                    +"GLJINVORDER= :GLJINVORDER,"
                    +"GLJCGNO= :GLJCGNO,"
                    +"GLJARTCLASS= :GLJARTCLASS,"
                    +"GLJBARCODE= :GLJBARCODE,"
                    +"GLJCOSTOBJ= :GLJCOSTOBJ,"
                    +"GLJCOSTOBJC= :GLJCOSTOBJC,"
                    +"GLJQUANTSTD= :GLJQUANTSTD,"
                    +"GLJQUSTDUN= :GLJQUSTDUN,"
                    +"GLJQUANTINV= :GLJQUANTINV,"
                    +"GLJQUINVUN= :GLJQUINVUN,"
                    +"GLJHRNO= :GLJHRNO,"
                    +"GLJCPD= :GLJCPD,"
                    +"GLJLIABLE= :GLJLIABLE,"
                    +"GLJINVCU= :GLJINVCU,"
                    +"GLJINVADDR= :GLJINVADDR,"
                    +"GLJPROGRP= :GLJPROGRP,"
                    +"GLJARTGRP= :GLJARTGRP,"
                    +"GLJPLANT= :GLJPLANT,"
                    +"GLJDEPT= :GLJDEPT,"
                    +"GLJDLAND= :GLJDLAND,"
                    +"GLJCENTRE= :GLJCENTRE,"
                    +"GLJASSOC= :GLJASSOC,"
                    +"GLJCREDCU= :GLJCREDCU,"
                    +"GLJORDERCU= :GLJORDERCU,"
                    +"GLJAGENT= :GLJAGENT,"
                    +"GLJDELNOTE= :GLJDELNOTE,"
                    +"GLJTRIANGLE= :GLJTRIANGLE,"
                    +"GLJLASTPOS= :GLJLASTPOS,"
                    +"GLJBOOKED= :GLJBOOKED,"
                    +"GLJFILLER1= :GLJFILLER1,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("GLJVOUCHER", OracleType.NVarChar).Value = dwData["GLJVOUCHER"].ToString(); 
          or1.Parameters.Add("GLJLINE", OracleType.NVarChar).Value = dwData["GLJLINE"].ToString(); 
          or1.Parameters.Add("GLJMANDANT", OracleType.NVarChar).Value = dwData["GLJMANDANT"].ToString(); 
          or1.Parameters.Add("GLJFIMANDANT", OracleType.NVarChar).Value = dwData["GLJFIMANDANT"].ToString(); 
          or1.Parameters.Add("GLJCONAREA", OracleType.NVarChar).Value = dwData["GLJCONAREA"].ToString(); 
          or1.Parameters.Add("GLJYEAR", OracleType.NVarChar).Value = dwData["GLJYEAR"].ToString(); 
          or1.Parameters.Add("GLJPERIOD", OracleType.NVarChar).Value = dwData["GLJPERIOD"].ToString(); 
          or1.Parameters.Add("GLJBOOKCODE", OracleType.NVarChar).Value = dwData["GLJBOOKCODE"].ToString(); 
          or1.Parameters.Add("GLJACCKIND", OracleType.NVarChar).Value = dwData["GLJACCKIND"].ToString(); 
          or1.Parameters.Add("GLJACCOUNT", OracleType.NVarChar).Value = dwData["GLJACCOUNT"].ToString(); 
          or1.Parameters.Add("GLJDEBCRED", OracleType.NVarChar).Value = dwData["GLJDEBCRED"].ToString(); 
          or1.Parameters.Add("GLJAMICU", OracleType.NVarChar).Value = dwData["GLJAMICU"].ToString(); 
          or1.Parameters.Add("GLJAMFCU", OracleType.NVarChar).Value = dwData["GLJAMFCU"].ToString(); 
          or1.Parameters.Add("GLJWEXRATE", OracleType.NVarChar).Value = dwData["GLJWEXRATE"].ToString(); 
          or1.Parameters.Add("GLJBOOKDAT", OracleType.NVarChar).Value = dwData["GLJBOOKDAT"].ToString(); 
          or1.Parameters.Add("GLJINVDAT", OracleType.NVarChar).Value = dwData["GLJINVDAT"].ToString(); 
          or1.Parameters.Add("GLJVALUEDAT", OracleType.NVarChar).Value = dwData["GLJVALUEDAT"].ToString(); 
          or1.Parameters.Add("GLJOPITEM", OracleType.NVarChar).Value = dwData["GLJOPITEM"].ToString(); 
          or1.Parameters.Add("GLJINVNO", OracleType.NVarChar).Value = dwData["GLJINVNO"].ToString(); 
          or1.Parameters.Add("GLJOPSUFF", OracleType.NVarChar).Value = dwData["GLJOPSUFF"].ToString(); 
          or1.Parameters.Add("GLJCURRENCY", OracleType.NVarChar).Value = dwData["GLJCURRENCY"].ToString(); 
          or1.Parameters.Add("GLJADINVNO", OracleType.NVarChar).Value = dwData["GLJADINVNO"].ToString(); 
          or1.Parameters.Add("GLJTAXKEY", OracleType.NVarChar).Value = dwData["GLJTAXKEY"].ToString(); 
          or1.Parameters.Add("GLJTAXCLASS", OracleType.NVarChar).Value = dwData["GLJTAXCLASS"].ToString(); 
          or1.Parameters.Add("GLJTAXPERC", OracleType.NVarChar).Value = dwData["GLJTAXPERC"].ToString(); 
          or1.Parameters.Add("GLJTAXNO", OracleType.NVarChar).Value = dwData["GLJTAXNO"].ToString(); 
          or1.Parameters.Add("GLJSERNO", OracleType.NVarChar).Value = dwData["GLJSERNO"].ToString(); 
          or1.Parameters.Add("GLJTOP", OracleType.NVarChar).Value = dwData["GLJTOP"].ToString(); 
          or1.Parameters.Add("GLJCDAMICU", OracleType.NVarChar).Value = dwData["GLJCDAMICU"].ToString(); 
          or1.Parameters.Add("GLJCDAMFCU", OracleType.NVarChar).Value = dwData["GLJCDAMFCU"].ToString(); 
          or1.Parameters.Add("GLJCDDAYS1", OracleType.NVarChar).Value = dwData["GLJCDDAYS1"].ToString(); 
          or1.Parameters.Add("GLJCDPERC1", OracleType.NVarChar).Value = dwData["GLJCDPERC1"].ToString(); 
          or1.Parameters.Add("GLJCDDAYS2", OracleType.NVarChar).Value = dwData["GLJCDDAYS2"].ToString(); 
          or1.Parameters.Add("GLJCDPERC2", OracleType.NVarChar).Value = dwData["GLJCDPERC2"].ToString(); 
          or1.Parameters.Add("GLJCDDAYSN", OracleType.NVarChar).Value = dwData["GLJCDDAYSN"].ToString(); 
          or1.Parameters.Add("GLJCCENTER", OracleType.NVarChar).Value = dwData["GLJCCENTER"].ToString(); 
          or1.Parameters.Add("GLJINVORDER", OracleType.NVarChar).Value = dwData["GLJINVORDER"].ToString(); 
          or1.Parameters.Add("GLJCGNO", OracleType.NVarChar).Value = dwData["GLJCGNO"].ToString(); 
          or1.Parameters.Add("GLJARTCLASS", OracleType.NVarChar).Value = dwData["GLJARTCLASS"].ToString(); 
          or1.Parameters.Add("GLJBARCODE", OracleType.NVarChar).Value = dwData["GLJBARCODE"].ToString(); 
          or1.Parameters.Add("GLJCOSTOBJ", OracleType.NVarChar).Value = dwData["GLJCOSTOBJ"].ToString(); 
          or1.Parameters.Add("GLJCOSTOBJC", OracleType.NVarChar).Value = dwData["GLJCOSTOBJC"].ToString(); 
          or1.Parameters.Add("GLJQUANTSTD", OracleType.NVarChar).Value = dwData["GLJQUANTSTD"].ToString(); 
          or1.Parameters.Add("GLJQUSTDUN", OracleType.NVarChar).Value = dwData["GLJQUSTDUN"].ToString(); 
          or1.Parameters.Add("GLJQUANTINV", OracleType.NVarChar).Value = dwData["GLJQUANTINV"].ToString(); 
          or1.Parameters.Add("GLJQUINVUN", OracleType.NVarChar).Value = dwData["GLJQUINVUN"].ToString(); 
          or1.Parameters.Add("GLJHRNO", OracleType.NVarChar).Value = dwData["GLJHRNO"].ToString(); 
          or1.Parameters.Add("GLJCPD", OracleType.NVarChar).Value = dwData["GLJCPD"].ToString(); 
          or1.Parameters.Add("GLJLIABLE", OracleType.NVarChar).Value = dwData["GLJLIABLE"].ToString(); 
          or1.Parameters.Add("GLJINVCU", OracleType.NVarChar).Value = dwData["GLJINVCU"].ToString(); 
          or1.Parameters.Add("GLJINVADDR", OracleType.NVarChar).Value = dwData["GLJINVADDR"].ToString(); 
          or1.Parameters.Add("GLJPROGRP", OracleType.NVarChar).Value = dwData["GLJPROGRP"].ToString(); 
          or1.Parameters.Add("GLJARTGRP", OracleType.NVarChar).Value = dwData["GLJARTGRP"].ToString(); 
          or1.Parameters.Add("GLJPLANT", OracleType.NVarChar).Value = dwData["GLJPLANT"].ToString(); 
          or1.Parameters.Add("GLJDEPT", OracleType.NVarChar).Value = dwData["GLJDEPT"].ToString(); 
          or1.Parameters.Add("GLJDLAND", OracleType.NVarChar).Value = dwData["GLJDLAND"].ToString(); 
          or1.Parameters.Add("GLJCENTRE", OracleType.NVarChar).Value = dwData["GLJCENTRE"].ToString(); 
          or1.Parameters.Add("GLJASSOC", OracleType.NVarChar).Value = dwData["GLJASSOC"].ToString(); 
          or1.Parameters.Add("GLJCREDCU", OracleType.NVarChar).Value = dwData["GLJCREDCU"].ToString(); 
          or1.Parameters.Add("GLJORDERCU", OracleType.NVarChar).Value = dwData["GLJORDERCU"].ToString(); 
          or1.Parameters.Add("GLJAGENT", OracleType.NVarChar).Value = dwData["GLJAGENT"].ToString(); 
          or1.Parameters.Add("GLJDELNOTE", OracleType.NVarChar).Value = dwData["GLJDELNOTE"].ToString(); 
          or1.Parameters.Add("GLJTRIANGLE", OracleType.NVarChar).Value = dwData["GLJTRIANGLE"].ToString(); 
          or1.Parameters.Add("GLJLASTPOS", OracleType.NVarChar).Value = dwData["GLJLASTPOS"].ToString(); 
          or1.Parameters.Add("GLJBOOKED", OracleType.NVarChar).Value = dwData["GLJBOOKED"].ToString(); 
          or1.Parameters.Add("GLJFILLER1", OracleType.NVarChar).Value = dwData["GLJFILLER1"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
